{extend name="public/base"/}
{block name="style"}
<link href="__PUBLIC__/ieasy/css/index.css?v=2.1.49" rel="stylesheet" type="text/css">
{/block}
{block name="body"}

<div id="console_main"></div>

<div class="body_sytle">
<div class="i_nav_fixed_box">
	<div class="i_nav_box">
		<a href="/personal/info.html" class="i_nav_user_img">
		
		<img alt="" src="{if session('user_auth.uid')>0}{$Think.session.user_auth.uid|get_avatar}{else}__PUBLIC__/ieasy/images/homeuser.png{/if}" /></a>
		<div class="i_nav_list">
			<a href="/?channel=2" class='nav_but {if $channel==2}hover{/if}'>
			<strong>女生</strong>
			<span></span>
			</a>
			<a href="/?channel=1" class='nav_but {if $channel==1}hover{/if}'>
			<strong>男生</strong>
			<span></span>
			</a>
			<a href="/personal/history" class='nav_but'>
			<strong>最近阅读</strong>
			<span></span>
			</a>
		</div>
	</div>
</div>
<!--i_nav_box 顶部导航-->
<div class="i_slide_box">
	<!-- Swiper -->
	<div class="swiper-container">
		<div class="swiper-wrapper">
			{volist name="ad" id="vo"}
			<div class="swiper-slide"><a href="{$vo.url}"><img alt="" src="{$vo.cover_id}" data-original="{$vo.cover_id}" /></a></div>
			{/volist}
		</div>
		<!-- Add Pagination -->
		<div class="swiper-pagination"></div>
	</div>
</div>

<!--i_slide_box 轮播图-->
	<div class="i_search_box"><a href="{:url('/search')}">搜索你想看的书</a></div>
	<!---
	<div class="i_topic_nav_box">
	<div class="i_topic_nav_li">
		<a href="/category.html">
			<div class="i_topic_nav_li_img"><img alt="" src="__PUBLIC__/ieasy/img/nav_icon_1.png" /></div>
			<strong>分类</strong>
		</a>
	</div>
	<div class="i_topic_nav_li">
		<a href="/free.html">
			<div class="i_topic_nav_li_img"><img alt="" src="__PUBLIC__/ieasy/img/nav_icon_2.png" /></div>
			<strong>免费</strong>
		</a>
	</div>
	<div class="i_topic_nav_li">
		<a href="/fullflag.html?channel={$channel}">
			<div class="i_topic_nav_li_img"><img alt="" src="__PUBLIC__/ieasy/img/nav_icon_3.png" /></div>
			<strong>完本</strong>
		</a>
	</div>
	<div class="i_topic_nav_li">
		<a href="/pay/index">
			<div class="i_topic_nav_li_img"><img alt="" src="__PUBLIC__/ieasy/img/nav_icon_5.png" /></div>
			<strong>账户充值</strong>
		</a>
	</div>
	---->
</div>

<div class="i_module_box">
	<div class="i_module_tit">
		<h2>新书推荐</h2>
		<strong></strong>
		<a href="/books.html?channel={$channel}&top=2">更多</a>
	</div>
	<div class="i_images_list">
		<ul class="i_images_ul" id="tj1">
		</ul>
	</div>
</div>

<div class="i_module_box">
	<div class="i_module_tit">
		<h2>主编力荐</h2>
		<strong></strong>
		<a href="/books.html?channel={$channel}&top=8">更多</a>
	</div>
	<div class="i_images_list">
		<ul class="i_images_ul" id="tj2">
		</ul>
	</div>
</div>

<div class="i_module_box">
	<div class="i_module_tit">
		<h2>读者推荐</h2>
		<strong></strong>
		<a href="/books.html?channel={$channel}&top=5">更多</a>
	</div>
	<div class="i_images_text_list">
		<ul class="i_images_text_ul" id="tj3">	
		</ul>
	</div>
</div>

<div class="i_module_box">
	<div class="i_module_tit">
		<h2>小说精选</h2>
		<strong></strong>
		<a href="/books.html?channel={$channel}&top=3">更多</a>
	</div>
	<div class="i_images_text_list">
		<ul class="i_images_text_ul" id="tj4">
		</ul>
	</div>
</div>

				
		
</div>
<!--body_sytle-->
<!--活动弹框-->
<div style="display: none;"  class="christmas_popup_box">
<div class="christmas_body">
	<div class="christmas_main">
		<a href="javascript:;" class="christmas_close_2"></a>
			</div>
</div>
<div class="christmas_jgb"></div>
</div>


<!-- 这里引入底部footer -->

<div class="footer_box">
    	<div class="footer_ewm">
                <img id="ewm" alt="" src="">
            </div>
    	<div class="footer_txt" style="width: 2.5rem;text-align: center">
		<p>工作时间：09：00-18：00<br><br></p>            </div>
</div>

<link rel="stylesheet" href="__PUBLIC__/ieasy/css/vendor.css" />
<link href="__PUBLIC__/ieasy/css/font_apds0v8n2bhp8pvi.css" rel="stylesheet">
<link href="__PUBLIC__/ieasy/css/front.css" rel="stylesheet">
<div style="padding-top: 30px;"></div>
 {block name="include"}{include file="public:tabbar" /}{/block}

{/block}
{block name="script"}
<script type="text/javascript" src="__PUBLIC__/ieasy/js/zepto.min.js?v=2.1.49"></script>
<script type="text/javascript" src="__PUBLIC__/ieasy/js/zepto.cookie.min.js?v=2.1.49"></script>

<!-- 这是zepto插件 -->
<script type="text/javascript" src="__PUBLIC__/ieasy/js/zepto.picLazyLoad.min.js?v=2.1.49"></script>
<script type="text/javascript" src="__PUBLIC__/ieasy/js/swiper.min.js?v=2.1.49"></script>

<script type="text/javascript" src="__PUBLIC__/ieasy/js/common.js?v=2.1.49"></script>
<script type="text/javascript" src="__PUBLIC__/ieasy/js/cps_log.js?v=2.1.49"></script>

<!-- 这里引入js -->
<script type="text/javascript" src="__PUBLIC__/ieasy/js/index.js?v=2.1.49"></script>
<script type="text/html" id="list1">
        <% for(var i = 0; i < data.length; i++){ %>

        <li>
			<a href="/book/info/id/<%= data[i]['id'] %>">
				<div class="i_images_img"><img alt="" src="<%= data[i]['cover'] %>" data-original="<%= data[i]['cover'] %>" /></div>
				<h3><%= data[i]['title'] %></h3>
			</a>
		</li>
        <% } %>    
</script>
<script type="text/html" id="list2">
        <% for(var i = 0; i < data.length; i++){ %>
<li>
				<a href="/book/info/id/<%= data[i]['id'] %>">
					<div class="i_images_img"><img alt="" src="<%= data[i]['cover'] %>" data-original="<%= data[i]['cover'] %>" /></div>
					<div class="i_images_txt_box">
						<h3><%= data[i]['title'] %></h3>
						<p><%= data[i]['intro'] %></p>
						<div class="i_images_txt_other">
							<strong><%= data[i]['category'] %></strong>
							<em><%= data[i]['allvisit'] %>人在追</em>
						</div>
					</div>
				</a>
			</li>
        <% } %>    
</script>

<script type="text/javascript">
var channel = {$channel};
var ewm = "{$qrcode}";
//{{{md5code}}}
$(function () {
	$.ajax({
		url: '/api/index/getbook/',
		type: 'post',
		data:{
			type:2,
			start:0,
			limit:4,
			channel:channel,
		},
		success: function (data) {
			if (data.code === 1) {
				var banner=template('list1',data);
				document.getElementById("tj1").innerHTML = banner;
			}
		}
	});
	$.ajax({
		url: '/api/index/getbook/',
		type: 'post',
		data:{
			type:8,
			start:0,
			limit:4,
			channel:channel,
		},
		success: function (data) {
			if (data.code === 1) {
				var banner=template('list1',data);
				document.getElementById("tj2").innerHTML = banner;
			}
		}
	});
	$.ajax({
		url: '/api/index/getbook/',
		type: 'post',
		data:{
			type:5,
			start:0,
			limit:4,
			channel:channel,
		},
		success: function (data) {
			if (data.code === 1) {
				var banner=template('list2',data);
				document.getElementById("tj3").innerHTML = banner;
			}
		}
	});
	$.ajax({
		url: '/api/index/getbook/',
		type: 'post',
		data:{
			type:3,
			start:0,
			limit:4,
			channel:channel,
		},
		success: function (data) {
			if (data.code === 1) {
				var banner=template('list2',data);
				document.getElementById("tj4").innerHTML = banner;
			}
		}
	});

	$("#ewm").attr('src',ewm);
});
</script>
{/block}